﻿--TODO: change paths accordingly

CREATE DATABASE [nbulib] ON  PRIMARY 
( NAME = N'nbulib', FILENAME = N'D:\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\nbulib.mdf' , SIZE = 2048KB , FILEGROWTH = 1024KB ), 
 FILEGROUP [HISTORY] 
( NAME = N'nbulib_hist', FILENAME = N'D:\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\nbulib_hist.ndf' , SIZE = 2048KB , FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'nbulib_log', FILENAME = N'D:\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\nbulib_log.ldf' , SIZE = 1024KB , FILEGROWTH = 10%)
GO
ALTER DATABASE [nbulib] SET COMPATIBILITY_LEVEL = 100
GO
ALTER DATABASE [nbulib] SET ANSI_NULL_DEFAULT OFF 
GO
ALTER DATABASE [nbulib] SET ANSI_NULLS OFF 
GO
ALTER DATABASE [nbulib] SET ANSI_PADDING OFF 
GO
ALTER DATABASE [nbulib] SET ANSI_WARNINGS OFF 
GO
ALTER DATABASE [nbulib] SET ARITHABORT OFF 
GO
ALTER DATABASE [nbulib] SET AUTO_CLOSE OFF 
GO
ALTER DATABASE [nbulib] SET AUTO_CREATE_STATISTICS ON 
GO
ALTER DATABASE [nbulib] SET AUTO_SHRINK OFF 
GO
ALTER DATABASE [nbulib] SET AUTO_UPDATE_STATISTICS ON 
GO
ALTER DATABASE [nbulib] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO
ALTER DATABASE [nbulib] SET CURSOR_DEFAULT  GLOBAL 
GO
ALTER DATABASE [nbulib] SET CONCAT_NULL_YIELDS_NULL OFF 
GO
ALTER DATABASE [nbulib] SET NUMERIC_ROUNDABORT OFF 
GO
ALTER DATABASE [nbulib] SET QUOTED_IDENTIFIER OFF 
GO
ALTER DATABASE [nbulib] SET RECURSIVE_TRIGGERS OFF 
GO
ALTER DATABASE [nbulib] SET  DISABLE_BROKER 
GO
ALTER DATABASE [nbulib] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO
ALTER DATABASE [nbulib] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO
ALTER DATABASE [nbulib] SET PARAMETERIZATION SIMPLE 
GO
ALTER DATABASE [nbulib] SET  READ_WRITE 
GO
ALTER DATABASE [nbulib] SET RECOVERY FULL 
GO
ALTER DATABASE [nbulib] SET  MULTI_USER 
GO
ALTER DATABASE [nbulib] SET PAGE_VERIFY CHECKSUM  
GO
USE [nbulib]
GO
IF NOT EXISTS (SELECT name FROM sys.filegroups WHERE is_default=1 AND name = N'PRIMARY') ALTER DATABASE [nbulib] MODIFY FILEGROUP [PRIMARY] DEFAULT
GO
